package Try;

import java.io.*;
import java.util.ArrayList;
import java.util.List;

public class Main16 {
    public static void main(String[] args) throws IOException {
        File f = new File("C:\\Users\\ruanjie\\Desktop\\test_pairs.txt");
        BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(f)));

        File ff = new File("C:\\Users\\ruanjie\\Desktop\\test_pairs_self2.txt");
        BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(ff)));
        String line;
        List<String> lists = new ArrayList<>();
        while ((line=reader.readLine())!=null){
            String[] strs = line.split(" ");
            String a =strs[1];
            String b = a.replace("1.jpg","0.jpg");
            writer.write(b+" "+a);
            writer.newLine();
        }
        writer.close();
    }
}
